<div class="container">
<div class="row clearfix">
	<div class="col-md-offset-2 col-md-8">
	
		<p><br/></p>
		<p style="line-height:32px;"><img src="{{$headimgurl}}" style="width:32px;height:32px;border-radius:100%;"> {{$username}}</p>
		<p>你好， </p>
		<p>使用第三方账号首次登录，您可以绑定一个已有的135账号或者自动创建一个新的135用户。</p>
		
		<p><a class="btn btn-default btn-block" href="/oauth/sina/register?state={{$_REQUEST['state']}}"><i class="fa fa-arrow-circle-right"></i> 我是新用户，直接完成登录，以后再设置资料</a></p>
		
		<p style="text-align:center;margin-top:20px;font-size:13px;">或者</p>
		
		<h3 class="ui-portlet-header">{{__('我是老用户，绑定已有135账户')}}</h3>
		<div role="tabpanel" class="tab-pane active" id="bind-user">
		    	{{$this->Form->create('User',array('id'=>'registerform','method'=>"post",'url'=>array('action'=>'bind','controller'=>'sina','plugin'=>'oauth')))}}
				
				<div class="form-group clearfix">
					<label class="col-sm-3 control-label" >{{__('手机号')}} <span style="color:red">*</span></label>
					<div class="col-sm-8 controls">
						{{$this->Form->input('email',array('class'=>'form-control','placeholder'=>'请输入注册的手机号或者邮箱','required'=>'required','div'=>false,'label'=>false,'type'=>"text",'maxlength'=>"32"))}}
					</div>
				</div>
				<div class="form-group clearfix">
					<label class="col-sm-3 control-label" >{{__('密码')}} <span style="color:red">*</span></label>
					<div class="col-sm-8 controls">
						{{$this->Form->input('password',array('class'=>'form-control','type'=>'password','minlength'=>"6",'required'=>'required','div'=>false,'label'=>false,'maxlength'=>"32"))}}
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"></label>
					<div class="col-sm-8"><input class="btn btn-primary" name="bind" type="submit" value="{{__('绑定已有用户')}}"></div>
				</div>
				{{$this->Form->end()}}
		</div>
	</div>
</div>
</div>
<script>
$('#set-password').click(function(){
	if($(this).attr('checked')==true){
		$('#set-password-panel').show();
	}
	else{
		$('#set-password-panel').hide();
	}
})
</script>